@extends('Admin.layout.layout')
@section('title','热门添加')
    <script type="text/javascript" charset="utf-8" src="/public/baidu/ueditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="/public/baidu/ueditor.all.min.js"> </script>
    <!--建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->
    <!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
    <script type="text/javascript" charset="utf-8" src="/public/baidu/lang/zh-cn/zh-cn.js"></script>
    
@section('content')
	<div class="row">
		<div class="col-lg-12">
			<h1 class="page-header">热门添加</h1>
		</div>
		<!-- /.col-lg-12 -->
	</div>
<div class="row">
    <div class="col-lg-12">
        <div class="panel panel-default">
            <div class="panel-heading">
                热门添加   
            </div>
             
            <div class="panel-body">
                <div class="row">
                    <div class="col-lg-6 col-lg-offset-3">
                        <form role="form" action="{{url('admin/remen/save')}}" method="post" enctype="multipart/form-data">
                           <input type="hidden" name="id" value="{{$remen->id}}">
                            <div class="form-group">
                                <label>热门标题</label>
                                <input class="form-control" name="title" value="{{$remen->title}}">
                            </div>
                            <div class="form-group">
                                <label>热门详情</label>
    							<script id="editor" name="content" type="text/plain" style="width:662px;height:200px;">{!! $remen->content !!}</script>                            </div>
                           	{{csrf_field()}}
                            <button type="submit" class="btn btn-primary col-lg-2 col-lg-offset-4">修改</button>
                            <button type="reset" class="btn btn-warning col-lg-offset-1">重置</button>
                        </form>
                    </div>
                </div>
                <!-- /.row (nested) -->
            </div>
            <!-- /.panel-body -->
        </div>
        <!-- /.panel -->
    </div>
    <!-- /.col-lg-12 -->
</div>  
<script type="text/javascript">
	//实例化编辑器
    //建议使用工厂方法getEditor创建和引用编辑器实例，如果在某个闭包下引用该编辑器，直接调用UE.getEditor('editor')就能拿到相关的实例
    var ue = UE.getEditor('editor',{
    	toolbars: [
		    ['fullscreen', 'source', 'undo', 'redo'],
		    ['bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc']
		]
    });
</script>
@endsection